<?php

class Zend_View_Helper_RightSidebar
{
    public function rightSidebar() {
        $view = new Zend_View();
        $view->setScriptPath(APPLICATION_PATH . '/views/scripts/');
        $mapper = new Application_Model_Mapper(new Application_Model_DbTable_Useful(), new Application_Model_Useful());
        $view->usefuls = $mapper->getCollection(array(Application_Model_DbTable_Useful::FIELD_IS_ACTIVE => 1), 'useful_id DESC', array('start' => 0, 'count' => 5));
        return $view->render('right-sidebar.phtml');
    }
}